package vista;
import java.awt.BorderLayout;
import javax.swing.JButton;

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.SwingUtilities;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;

import controlador.ContActualizarCategoria;
import controlador.ContSelecProducto;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class DlgSelecProducto extends javax.swing.JDialog {
	private JPanel pnlProductos;
	private JScrollPane jScrollPane1;
	private JButton btSalir;
	private JButton btAceptar;
	private JLabel lblSeleccionar;
	private JTable tblProductos;

	private ContSelecProducto controlador;

	public DlgSelecProducto(JDialog dialog, ContSelecProducto controlador) {
		super(dialog);
		this.controlador = controlador;
		initGUI();
	}
	
	private void initGUI() {
		try {
			{
				this.setTitle("Productos");
				{
					pnlProductos = new JPanel();
					getContentPane().add(pnlProductos, BorderLayout.CENTER);
					pnlProductos.setLayout(null);
					pnlProductos.setPreferredSize(new java.awt.Dimension(346, 246));
					{
						lblSeleccionar = new JLabel();
						pnlProductos.add(lblSeleccionar);
						lblSeleccionar.setText("SELECCIONE UN PRODUCTO");
						lblSeleccionar.setBounds(91, 22, 175, 14);
					}
					{
						jScrollPane1 = new JScrollPane();
						pnlProductos.add(jScrollPane1);
						jScrollPane1.setBounds(40, 55, 260, 105);
						{
							tblProductos = new JTable();
							jScrollPane1.setViewportView(tblProductos);
							tblProductos.setBounds(73, 81, 256, 86);
						}
					}
					{
						btAceptar = new JButton();
						pnlProductos.add(btAceptar);
						btAceptar.setText("Aceptar");
						btAceptar.setBounds(153, 201, 79, 25);
					}
					{
						btSalir = new JButton();
						pnlProductos.add(btSalir);
						btSalir.setText("Salir");
						btSalir.setBounds(262, 201, 63, 25);
					}
				}
			}
			this.setSize(351, 275);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	public JTable getTblProductos() {
		return tblProductos;
	}

	public JButton getBtSalir() {
		return btSalir;
	}

	public JButton getBtAceptar() {
		return btAceptar;
	}

	public void mostrarMensaje(String mensaje) {
		JOptionPane.showMessageDialog(this, mensaje);
	}
}
